// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
// http://www.zhengzhong.net/
//
// $Id: error_handler.hpp 318 2009-03-02 14:03:21Z heavyzheng $
//

#ifndef ZZHENG_XML_SAX_ERROR_HANDLER_HPP_20090122__
#define ZZHENG_XML_SAX_ERROR_HANDLER_HPP_20090122__

#include <zzheng/xml/config.hpp>
#include <zzheng/xml/sax/types.hpp>
#include <zzheng/xml/sax/exception.hpp>
#include <zzheng/xml/sax/handler_tag.hpp>
#include <zzheng/xml/sax/error_info.hpp>

#include <string>


namespace zzheng {
namespace xml {
namespace sax {

    class error_handler {

    public:

        typedef error_handler_tag handler_category;

    public:

        //! Default constructor.
        explicit error_handler() {
            // Do nothing.
        }

        //! Virtual destructor that makes this class derivable.
        virtual ~error_handler() {
            // Do nothing.
        }

        virtual void warning(const error_info& info) = 0;

        virtual void error(const error_info& info) = 0;

        virtual void fatal(const error_info& info) = 0;

    }; // class error_handler

} // namespace zzheng::xml::sax
} // namespace zzheng::xml
} // namespace zzheng


#endif // ZZHENG_XML_SAX_ERROR_HANDLER_HPP_20090122__




